home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / A / AE Sample (TC5) / Init.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-07  |  846 b   |  31 lines  |  [TEXT/KAHL]

  1. /* File: Init.c */
  2.  
  3. #include    "AESimple.h"
  4.  
  5.  
  6. void Init_all()
  7. {
  8.     Handle         a_menu_bar;
  9.     EventRecord    one_null_event;
  10.     
  11.     InitGraf(&thePort);                      /*    init Quickdraw and global variables*/
  12.     InitFonts();                           /*    initialize Font manager        */
  13.     InitWindows();                           /* init Window manager and setup WMgr GrafPort*/
  14.     InitMenus();
  15.     TEInit();                              /* inititalize TextEdit                */
  16.     InitDialogs(NIL);                    /* initialize Dialog manager        */
  17.  
  18.     FlushEvents(everyEvent, 0);            /*clear the Event queue of all events */
  19.  
  20.  
  21.     a_menu_bar = GetNewMBar(1001);
  22.     SetMenuBar(a_menu_bar);    
  23.     AddResMenu(GetMHandle(kAppleMenu), 'DRVR');
  24.  
  25.     gDone = FALSE;                          /* initialize flag to control Main Event Loop    */
  26.     gMenuState = 0;                        /* We just loaded the menu bar */
  27.     InstallAppleEventHandlers();
  28.     InitCursor();                          /* set the cursor to arrow instead of clock    */
  29.  
  30. }
  31.